Removed small OOP code from main branch

This commit is contained in:
YourFriendlyNeighborhoodDealer 2018-12-05 10:59:29 +01:00
parent 02461eb74a
commit 96ea28e208

30
main.js
View file

@ -746,36 +746,6 @@ function Load(cwith) {
return ReadFile(cwith);
}
// Creates a Question.
// q: question
// a: answer
// i: image
function Question(q, a, i) {
this.question = q;
this.answer = a;
this.image = i;
// Compares to another question. Simplifies question before comparing
// returns: true, if its matching
this.Compare = function(q2) {
var j = 0;
for (var j = 0; j < questionData.length; j++) {
var q1 = SimplifyStringForComparison(this.question);
var q2 = SimplifyStringForComparison(q2.question);
var a1 = SimplifyStringForComparison();
var a2 = SimplifyStringForComparison();
if (q1.includes(q2) && a2.includes(a2)) { // if the questions and the answers match
if (quiz[i].i && questionData[j].i) { // if it has image questionData
if (questionData[j].i.includes(quiz[i].i)) // if they are the same
return j;
} else {
return j;
}
}
}
return -1;
};
}
function LoadMOTD(resource) {
try {
if (resource[0][0] == '@')