Just keep in mind the "change ruby code" => "rake build" => "refresh browser" development cycle. This can be shortened to "change ruby code" => "refresh browser" if you set up guard, but I'll save that for the future. If you already know how, feel free to set that up!

Keyboard and Mouse input

You can respond to user input with a couple of helper methods
Change just a few lines in your app.rb file

classGame < Dare::Windowdefinitializesuperwidth:800, height:600, border:true#lets add an instance variable to store where our box is@x=10enddefdraw# if the right arrow is being held down, add 5 to the positionif button_down? Dare::KbRight@x+=5end# if the position gets too large, reset itif@x>600@x=10end@y= mouse_y # mouse_y is a helper method which returns the y-position off the mouse#be sure to set the x position to @x and the y position to @y in the draw_rect method!
draw_rect(top_left: [@x,@y], width:50, height:50, color:'red')
endend

Now rake build, refresh the browser, and voila! You can press the right arrow on your keyboard, and the box will move to the right! Move your mouse up and down and watch your box rise and fall!