xxxxxxxxxx
29
// homage to bpNichols' "First Screening"
// http://www.vispo.com/bp/introduction.htm
let trainCol = 0;
let ghostCol = term.cols - 5; // length of "ghost"
function setup() {
noCanvas();
frameRate(4);
}
function draw() {
if (frameCount % 2 == 0) {
term.write(ansi.cursor.position(term.rows - 1, ghostCol));
term.write("GHOST");
if (ghostCol > 1) {
ghostCol--;
}
}
else {
term.write(ansi.cursor.position(term.rows - 1, trainCol));
term.write("TRAIN");
if (trainCol < term.cols - 5) {
trainCol++;
}
}
}