Created
January 25, 2015 14:31
-
-
Save zaftzaft/f0879b115db090bafa92 to your computer and use it in GitHub Desktop.
blessed で drawille する最小
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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