Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'befunge93'
- class TallBefunge93 < Befunge93
- # 80 columns, "infinite" rows
- def move
- @position[0] = (@position[0] + @direction[0]) % 80
- @position[1] = @position[1] + @direction[1]
- end
- end
- class WideBefunge93 < Befunge93
- # "infinite" columns, 25 rows
- def move
- @position[0] = @position[0] + @direction[0]
- @position[1] = (@position[1] + @direction[1]) % 25
- end
- end
- class HugeBefunge93 < Befunge93
- # "infinite" columns, "infinite" rows
- def move
- @position[0] = @position[0] + @direction[0]
- @position[1] = @position[1] + @direction[1]
- end
- end
Add Comment
Please, Sign In to add comment