Closed dealingwith closed 3 years ago
Uh oh... the on method doesn't work either (reference)...
This code:
def move on :key_down do |event| [code] end end
throws:
/home/jamesli/github_repos/2021-computer-adventures/tetrominos.rb:32:in `move': undefined method `on' for #<Tetromino:0x000055b4456bd678> (NoMethodError)
and previous code except with a $ before on throws:
/home/jamesli/github_repos/2021-computer-adventures/tetris.rb:3:in `require_relative': /home/jamesli/github_repos/2021-computer-adventures/tetrominos.rb:32: syntax error, unexpected ':', expecting `end' (SyntaxError) $on :key_down do |event| ^
Uh oh... the on method doesn't work either (reference)...
This code:
throws:
and previous code except with a $ before on throws: