Skip to content

Instantly share code, notes, and snippets.

@zaftzaft
Created January 25, 2015 14:31
Show Gist options
  • Save zaftzaft/f0879b115db090bafa92 to your computer and use it in GitHub Desktop.
Save zaftzaft/f0879b115db090bafa92 to your computer and use it in GitHub Desktop.
blessed で drawille する最小
blessed = require "blessed"
Canvas = require "drawille"
ctx = new Canvas 40, 40 # 20 * 10
# 10 * 10 block
for x in [0..10]
for y in [0..10]
ctx.set x, y
screen = blessed.screen()
screen.key "q", -> process.exit 0
box = blessed.Box
bg: "black"
box.setContent ctx.frame()
screen.append box
screen.render()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment