fix(ch03): clarity with method naming

This commit is contained in:
Brett Chalupa 2022-12-11 11:27:49 -05:00
parent 0c02c8d24e
commit 3da81f8190

View file

@ -44,7 +44,7 @@ Outputting info to the console isn't that helpful for the player, but can you be
We want to display a fireball on the screen when the action key is pressed. We've got most of the code, all we need to do is change `puts` to instead display the fireball.
At the top of `#tick` (`#name` is Ruby shorthand for "the name method"), assign an empty array to `args.state.fireballs` if nothing has been assigned yet. This will let us keep track of fireballs across the game loop to do all sorts of things with them (display them, move them, collide them with other objects):
At the top of `#tick` (`#name` is Ruby shorthand for "the `name` method"), assign an empty array to `args.state.fireballs` if nothing has been assigned yet. This will let us keep track of fireballs across the game loop to do all sorts of things with them (display them, move them, collide them with other objects):
``` ruby
{{#include code/chapter_03/03_displaying_fireballs/app/main.rb:1:4}}