forked from: 線を引く

ported from BASIC: http://meatfighter.com/mad/