=correct.length-1; G.lastAnswerOk=ok; G.lastCorrectAnswer=ok?null:ex.word.en; } else if(ex.mode==='translate_en'){ // Fuzzy check: must contain the key English word var keyWord=ex.word.en.toLowerCase(); ok=val.includes(keyWord)||keyWord.includes(val)&&val.length>3; // Also check length - should be a sentence attempt if(val.split(' ').length<2) ok=false; G.lastAnswerOk=ok; G.lastCorrectAnswer=ok?null:ex.word.ex; } else if(ex.mode==='translate_ru'){ // Fuzzy check: must contain key Russian word var keyRu=ex.word.ru.split(',')[0].toLowerCase().trim(); ok=val.includes(keyRu.split(' ')[0])||val.length>5&&val.split(' ').length>1; G.lastAnswerOk=ok; G.lastCorrectAnswer=ok?null:ex.word.ru; } processAnswer(ok,ex.word.id); }; var fi=document.getElementById('fill-in'); if(fi){ fi.focus(); fi.onkeydown=function(e){ if(e.key==='Enter'){ var ck2=document.getElementById('btn-check'); if(ck2) ck2.click(); var nx2=document.getElementById('btn-next'); if(nx2) nx2.click(); } }; } } { id:'present_simple', title:'Present Simple', level:'A1', desc:'Факты, привычки, расписание', rules:[ {h:'Формула',formula:'Subject + V1 (he/she/it: +s/es)\nI work · She works · They work'}, {h:'Использование',body:'Привычные действия, факты, инструкции.\nТриггеры: always, usually, often, never, every day.'}, {h:'Отрицание / Вопрос',formula:'I/You/We/They + do not + V1\nHe/She/It + does not + V1\nDo/Does + Subject + V1?'}, {h:'Примеры',examples:[ ["She runs a media agency.","Она управляет медиаагентством."], ["He does not check emails on weekends.","Он не проверяет почту в выходные."], ["Does the algorithm run daily?","Алгоритм запускается ежедневно?"], ]}, ] },>