/*
 * memcurve
 * https://github.com/shengmin/memcurve
 *
 * Copyright (c) 2013 ShengMin Zhang
 * Licensed under the MIT license.
 */

'use strict';

exports.awesome = function() {
  return 'awesome';
};

@@ -1,204 +1,871 @@
-/*%0A * memcurve%0A * https://github.com/shengmin/memcurve%0A *%0A * Copyright (c) 2013 ShengMin Zhang%0A * Licensed under the MIT license.%0A */%0A%0A'use strict';%0A%0Aexports.awesome = function() %7B%0A  return 'awesome';%0A%7D
+'use strict';%0A%0Avar red   = '%5Cu001b%5B31m';%0Avar green = '%5Cu001b%5B32m';%0Avar blue  = '%5Cu001b%5B34m';%0Avar reset = '%5Cu001b%5B0m';%0A%0Avar StudySet = require('./StudySet');%0Avar studySet = StudySet.fromYaml(process.argv%5B2%5D);%0A%0Afunction printQuestion() %7B%0A  if (studySet.hasMore()) %7B%0A    console.log(blue + 'Question: ' + studySet.getQuestion() + reset);%0A    process.stdin.once('data', onData);%0A  %7D else %7B%0A    console.log(green + 'Done :)' + reset);%0A    process.stdin.pause();%0A  %7D%0A%7D%0A%0Afunction onData(data) %7B%0A  var answer = studySet.getAnswer();%0A  var color = '';%0A%0A  if (data.charAt(0) == 'y') %7B%0A    studySet.markRight();%0A    color = green;%0A  %7D else %7B%0A    studySet.markWrong();%0A    color = red;%0A  %7D%0A  console.log(color + 'Answer: ' + answer + reset);%0A  console.log('-----------------------');%0A  printQuestion();%0A%7D%0A%0Aprocess.stdin.resume();%0Aprocess.stdin.setEncoding('utf8');%0A%0AprintQuestion()
 ;%0A

add terminal program