A 1-bit display buffer that renders to 2x8 braille dot characters
-
Add the dependency to your
shard.yml
:dependencies: dot_display: github: sleepinginsomniac/dot_display
-
Run
shards install
require "dot_display"
dd = DotDisplay.new(16, 16)
dd.height.times do |y|
dd.width.times do |x|
dd[x, y] = true if (y + x) % 2 == 0
end
end
dd.to_s # =>
# ⢕⢕⢕⢕⢕⢕⢕⢕
# ⢕⢕⢕⢕⢕⢕⢕⢕
# ⢕⢕⢕⢕⢕⢕⢕⢕
# ⢕⢕⢕⢕⢕⢕⢕⢕
- Alex Clink - creator and maintainer