Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
process.stdin.on('mousepress', function (click) {
if (click.release) {
space_or_mouse();
}
});
process.on('exit', function () {
//disable mouse on exit, so that the state is back to normal for the terminal.
keypress.disableMouse(charm);
});
process.stdin.resume();
charm.reset();
keypress.enableMouse(charm);
botSay("Hey! Let's start solving!");
botSay('The session starts now!');
start_inspect = print_help(right_row_num, 1);
charm.position(1, start_inspect)
start_inspect += prepNewSolve();
start_time = (new Date()).toTimeString().split(' ')[0]
var total_time = new Stopwatch();
total_time.start();
charm.position(1, start_inspect);
};
#!/usr/bin/env node
var ac = require('ansi-canvas');
var term = ac();
var rfb = require('rfb2');
var argv = require('optimist').argv;
var keypress = require('keypress');
keypress(process.stdin);
keypress.enableMouse(process.stdout);
setRawMode(true);
function setRawMode(val) {
if (process.stdin.setRawMode)
process.stdin.setRawMode(val);
else
require('tty').setRawMode(val);
}
var canvas, ctx;
function scaleFactor() {
var oldWidth = canvas.width;
var oldHeight = canvas.height;
var maxWidth = term.width;
var maxHeight = term.height;