up
All checks were successful
Deploy to Production / deploy (push) Successful in 9s

This commit is contained in:
lubukhu
2026-02-26 18:44:46 +07:00
parent 065d682526
commit b338f83dd9
60 changed files with 3079 additions and 76 deletions

View File

@@ -814,7 +814,7 @@ SenaSDK.prototype.start = function () {
if (self.shuffle && self.data?.options) {
self.shuffleArray(self.data.options);
}
self.startTime = Date.now();
// self.startTime = Date.now();
};
SenaSDK.prototype.markUserInteraction = function () {
@@ -870,8 +870,8 @@ SenaSDK.prototype.end = function (answer, callback) {
// ========== STANDARD GAMES (Quiz/Sort/Fill) ==========
self.endTime = Date.now();
const duration = (self.endTime - self.startTime) / 1000;
// self.endTime = Date.now();
// const duration = (self.endTime - self.startTime) / 1000;
const answerStr = String(answer || '');
const userAnswers = answerStr.includes('|')
@@ -918,21 +918,19 @@ SenaSDK.prototype.end = function (answer, callback) {
});
}
// Check time limit
if (self.timeLimit > 0 && duration > self.timeLimit) {
isCorrect = false;
console.log('🎮 Sena SDK: Time limit exceeded');
}
// // Check time limit
// if (self.timeLimit > 0 && duration > self.timeLimit) {
// isCorrect = false;
// console.log('🎮 Sena SDK: Time limit exceeded');
// }
const result = {
isCorrect: isCorrect,
duration: duration,
correctAnswer: correctAnswers.join(' | '),
userAnswer: userAnswers.join(' | ')
};
isCorrect: isCorrect,
correctAnswer: correctAnswers.join(' | '),
userAnswer: userAnswers.join(' | ')
};
console.log(`🎮 Sena SDK: Result: ${isCorrect ? 'CORRECT' : 'INCORRECT'} (${duration}s)`);
console.log(`🎮 Sena SDK: Result: ${isCorrect ? 'CORRECT' : 'INCORRECT'}`);
if (callback) callback(result.isCorrect);
return result;
};