Guest User

Untitled

a guest
Feb 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. require 'befunge93'
  2.  
  3. class TallBefunge93 < Befunge93
  4. # 80 columns, "infinite" rows
  5. def move
  6. @position[0] = (@position[0] + @direction[0]) % 80
  7. @position[1] = @position[1] + @direction[1]
  8. end
  9. end
  10.  
  11. class WideBefunge93 < Befunge93
  12. # "infinite" columns, 25 rows
  13. def move
  14. @position[0] = @position[0] + @direction[0]
  15. @position[1] = (@position[1] + @direction[1]) % 25
  16. end
  17. end
  18.  
  19. class HugeBefunge93 < Befunge93
  20. # "infinite" columns, "infinite" rows
  21. def move
  22. @position[0] = @position[0] + @direction[0]
  23. @position[1] = @position[1] + @direction[1]
  24. end
  25. end
Add Comment
Please, Sign In to add comment