--!name Flashcards
--!icon book
--!category Learning
local ae={"World capitals|Country|Capital|R||globe;France|Paris;Germany|Berlin;Italy|Rome;Spain|Madrid;Portugal|Lisbon;United Kingdom|London;Ireland|Dublin;Belgium|Brussels;Netherlands|Amsterdam;Austria|Vienna;Switzerland|Bern;Poland|Warsaw;Czech Republic|Prague;Hungary|Budapest;Greece|Athens;Sweden|Stockholm;Norway|Oslo;Denmark|Copenhagen;Finland|Helsinki;Iceland|Reykjavik;Russia|Moscow;Ukraine|Kyiv;Romania|Bucharest;Bulgaria|Sofia;Serbia|Belgrade;Croatia|Zagreb;Slovakia|Bratislava;Slovenia|Ljubljana;Estonia|Tallinn;Latvia|Riga;Lithuania|Vilnius;Albania|Tirana;United States|Washington, D.C.;Canada|Ottawa;Mexico|Mexico City;Cuba|Havana;Jamaica|Kingston;Costa Rica|San Jose;Panama|Panama City;Colombia|Bogota;Venezuela|Caracas;Ecuador|Quito;Peru|Lima;Brazil|Brasilia;Chile|Santiago;Argentina|Buenos Aires;Uruguay|Montevideo;Paraguay|Asuncion;China|Beijing;Japan|Tokyo;South Korea|Seoul;North Korea|Pyongyang;Mongolia|Ulaanbaatar;India|New Delhi;Pakistan|Islamabad;Bangladesh|Dhaka;Nepal|Kathmandu;Thailand|Bangkok;Vietnam|Hanoi;Cambodia|Phnom Penh;Laos|Vientiane;Philippines|Manila;Afghanistan|Kabul;Iran|Tehran;Iraq|Baghdad;Saudi Arabia|Riyadh;Syria|Damascus;Lebanon|Beirut;Jordan|Amman;Qatar|Doha;United Arab Emirates|Abu Dhabi;Turkey|Ankara;Morocco|Rabat;Algeria|Algiers;Tunisia|Tunis;Libya|Tripoli;Senegal|Dakar;Ghana|Accra;Nigeria|Abuja;Ethiopia|Addis Ababa;Kenya|Nairobi;Uganda|Kampala;Rwanda|Kigali;Angola|Luanda;Zimbabwe|Harare;Madagascar|Antananarivo;Australia|Canberra;New Zealand|Wellington;Fiji|Suva;Belarus|Minsk;Moldova|Chisinau;Malta|Valletta;Cyprus|Nicosia;Bosnia and Herzegovina|Sarajevo;Montenegro|Podgorica;North Macedonia|Skopje;Georgia|Tbilisi;Armenia|Yerevan;Azerbaijan|Baku;Uzbekistan|Tashkent;Kuwait|Kuwait City;Oman|Muscat;Bahrain|Manama;Bhutan|Thimphu;Guatemala|Guatemala City;Honduras|Tegucigalpa;Nicaragua|Managua;El Salvador|San Salvador;Dominican Republic|Santo Domingo;Haiti|Port-au-Prince;Papua New Guinea|Port Moresby;Mali|Bamako;Cameroon|Yaounde;DR Congo|Kinshasa;Somalia|Mogadishu;Mozambique|Maputo;Zambia|Lusaka;Botswana|Gaborone;Namibia|Windhoek",
"US state capitals|State|Capital|R||;Alabama|Montgomery;Alaska|Juneau;Arizona|Phoenix;Arkansas|Little Rock;California|Sacramento;Colorado|Denver;Connecticut|Hartford;Delaware|Dover;Florida|Tallahassee;Georgia|Atlanta;Hawaii|Honolulu;Idaho|Boise;Illinois|Springfield;Indiana|Indianapolis;Iowa|Des Moines;Kansas|Topeka;Kentucky|Frankfort;Louisiana|Baton Rouge;Maine|Augusta;Maryland|Annapolis;Massachusetts|Boston;Michigan|Lansing;Minnesota|Saint Paul;Mississippi|Jackson;Missouri|Jefferson City;Montana|Helena;Nebraska|Lincoln;Nevada|Carson City;New Hampshire|Concord;New Jersey|Trenton;New Mexico|Santa Fe;New York|Albany;North Carolina|Raleigh;North Dakota|Bismarck;Ohio|Columbus;Oklahoma|Oklahoma City;Oregon|Salem;Pennsylvania|Harrisburg;Rhode Island|Providence;South Carolina|Columbia;South Dakota|Pierre;Tennessee|Nashville;Texas|Austin;Utah|Salt Lake City;Vermont|Montpelier;Virginia|Richmond;Washington|Olympia;West Virginia|Charleston;Wisconsin|Madison;Wyoming|Cheyenne",
"Spanish basics|English|Spanish|R||es;hello|hola;see you later|hasta luego;please|por favor;thank you|gracias;you're welcome|de nada;good afternoon|buenas tardes;good night|buenas noches;excuse me|disculpe;I'm sorry|lo siento;I don't understand|no entiendo;My name is ...|me llamo ...;nice to meet you|mucho gusto;very well|muy bien;water|el agua;bread|el pan;milk|la leche;cheese|el queso;wine|el vino;beer|la cerveza;apple|la manzana;egg|el huevo;meat|la carne;fish (as food)|el pescado;chicken|el pollo;rice|el arroz;house|la casa;dog|el perro;cat|el gato;book|el libro;city|la ciudad;street|la calle;school|la escuela;beach|la playa;sun|el sol;moon|la luna;sea|el mar;money|el dinero;friend|el amigo / la amiga;family|la familia;mother|la madre;father|el padre;brother|el hermano;sister|la hermana;son|el hijo;daughter|la hija;man|el hombre;woman|la mujer;boy|el chico;girl|la chica;night|la noche;week|la semana;today|hoy;yesterday|ayer;now|ahora;always|siempre;never|nunca;red|rojo;blue|azul;green|verde;black|negro;white|blanco;yellow|amarillo;big|grande;good|bueno;bad|malo;new|nuevo;old|viejo;pretty|bonito;hot|caliente;one|uno;two|dos;three|tres;four|cuatro;five|cinco;six|seis;seven|siete;eight|ocho;nine|nueve;ten|diez;to eat|comer;to drink|beber;to speak|hablar;to go|ir;to come|venir;to sleep|dormir;to read|leer;to write|escribir;to see|ver;to live|vivir;to want|querer;to have|tener;to buy|comprar;to love|amar;to do, to make|hacer",
"French basics|English|French|R||fr;hello|bonjour;good evening|bonsoir;good night|bonne nuit;goodbye|au revoir;thank you|merci;thank you very much|merci beaucoup;you're welcome|de rien;yes|oui;no|non;excuse me|excusez-moi;sorry|pardon;I don't understand|je ne comprends pas;My name is ...|je m'appelle ...;water|l'eau;bread|le pain;milk|le lait;cheese|le fromage;wine|le vin;apple|la pomme;meat|la viande;fish|le poisson;chicken|le poulet;house|la maison;dog|le chien;cat|le chat;book|le livre;car|la voiture;city|la ville;street|la rue;beach|la plage;sun|le soleil;moon|la lune;sea|la mer;sky|le ciel;money|l'argent;friend|l'ami / l'amie;family|la famille;mom|maman;dad|papa;son|le fils;girl, daughter|la fille;man|l'homme;woman|la femme;child|l'enfant;day|le jour;night|la nuit;week|la semaine;today|aujourd'hui;tomorrow|demain;yesterday|hier;now|maintenant;always|toujours;never|jamais;red|rouge;blue|bleu;green|vert;black|noir;white|blanc;yellow|jaune;grey|gris;big|grand;small|petit;good|bon;bad|mauvais;new|nouveau;old|vieux;beautiful|beau / belle;hot|chaud;cold|froid;one|un;two|deux;three|trois;four|quatre;five|cinq;seven|sept;eight|huit;nine|neuf;ten|dix;to eat|manger;to drink|boire;to speak|parler;to go|aller;to come|venir;to sleep|dormir;to read|lire;to see|voir;to live|vivre;to want|vouloir;to have|avoir;to buy|acheter;to love|aimer;to do, to make|faire",
"German basics|English|German|R||de;hello|hallo;good morning|guten Morgen;good day|guten Tag;good evening|guten Abend;good night|gute Nacht;goodbye|auf Wiedersehen;thank you|danke;thank you very much|vielen Dank;please|bitte;yes|ja;no|nein;excuse me|Entschuldigung;I'm sorry|es tut mir leid;I don't understand|ich verstehe nicht;My name is ...|mein Name ist ...;How are you? (formal)|Wie geht es Ihnen?;Where is ...?|Wo ist ...?;water|das Wasser;bread|das Brot;milk|die Milch;wine|der Wein;beer|das Bier;coffee|der Kaffee;tea|der Tee;soup|die Suppe;apple|der Apfel;egg|das Ei;meat|das Fleisch;fish|der Fisch;house|das Haus;dog|der Hund;cat|die Katze;book|das Buch;car|das Auto;train|der Zug;city|die Stadt;school|die Schule;table|der Tisch;chair|der Stuhl;window|das Fenster;bed|das Bett;sun|die Sonne;moon|der Mond;sea|das Meer;money|das Geld;friend|der Freund / die Freundin;family|die Familie;mother|die Mutter;father|der Vater;brother|der Bruder;sister|die Schwester;son|der Sohn;daughter|die Tochter;man|der Mann;woman|die Frau;child|das Kind;boy|der Junge;day|der Tag;night|die Nacht;week|die Woche;year|das Jahr;today|heute;tomorrow|morgen;yesterday|gestern;now|jetzt;always|immer;never|nie;red|rot;blue|blau;yellow|gelb;black|schwarz;grey|grau;small|klein;good|gut;bad|schlecht;new|neu;old|alt;cold|kalt;fast|schnell;slow|langsam;one|eins;two|zwei;three|drei;four|vier;six|sechs;seven|sieben;eight|acht;nine|neun;ten|zehn;to eat|essen;to drink|trinken;to speak|sprechen;to go|gehen;to come|kommen;to sleep|schlafen;to read|lesen;to write|schreiben;to see|sehen;to live|leben;to have|haben;to be|sein;to buy|kaufen;to love|lieben;to do, to make|machen",
"Italian basics|English|Italian|R||it;hello, bye (informal)|ciao;good morning|buongiorno;good evening|buonasera;good night|buonanotte;goodbye|arrivederci;thank you|grazie;please|per favore;you're welcome|prego;excuse me (formal)|mi scusi;I don't understand|non capisco;My name is ...|mi chiamo ...;How are you? (formal)|Come sta?;How much is it?|Quanto costa?;water|l'acqua;bread|il pane;milk|il latte;cheese|il formaggio;wine|il vino;beer|la birra;apple|la mela;egg|l'uovo;meat|la carne;fish|il pesce;chicken|il pollo;rice|il riso;house|la casa;dog|il cane;cat|il gatto;book|il libro;car|la macchina;train|il treno;street|la strada;school|la scuola;beach|la spiaggia;sun|il sole;moon|la luna;sea|il mare;money|i soldi;friend|l'amico / l'amica;family|la famiglia;mother|la madre;father|il padre;brother|il fratello;sister|la sorella;son|il figlio;daughter|la figlia;man|l'uomo;woman|la donna;boy|il ragazzo;girl|la ragazza;day|il giorno;night|la notte;week|la settimana;year|l'anno;today|oggi;tomorrow|domani;yesterday|ieri;now|adesso;always|sempre;never|mai;red|rosso;blue|blu;green|verde;black|nero;white|bianco;yellow|giallo;big|grande;small|piccolo;good|buono;new|nuovo;old|vecchio;beautiful|bello / bella;hot|caldo;cold|freddo;one|uno;two|due;three|tre;four|quattro;five|cinque;six|sei;seven|sette;eight|otto;nine|nove;ten|dieci;to eat|mangiare;to drink|bere;to speak|parlare;to go|andare;to come|venire;to sleep|dormire;to read|leggere;to write|scrivere;to see|vedere;to live|vivere;to have|avere;to be|essere;to buy|comprare;to love|amare;to do, to make|fare",
"Periodic table|Symbol|Element|R|Atomic number|atom;H|Hydrogen|1;He|Helium|2;Li|Lithium|3;Be|Beryllium|4;B|Boron|5;C|Carbon|6;N|Nitrogen|7;O|Oxygen|8;F|Fluorine|9;Ne|Neon|10;Na|Sodium|11;Mg|Magnesium|12;Al|Aluminium|13;Si|Silicon|14;P|Phosphorus|15;S|Sulfur|16;Cl|Chlorine|17;Ar|Argon|18;K|Potassium|19;Ca|Calcium|20;Sc|Scandium|21;Ti|Titanium|22;V|Vanadium|23;Cr|Chromium|24;Mn|Manganese|25;Fe|Iron|26;Co|Cobalt|27;Ni|Nickel|28;Cu|Copper|29;Zn|Zinc|30;Ga|Gallium|31;Ge|Germanium|32;As|Arsenic|33;Se|Selenium|34;Br|Bromine|35;Kr|Krypton|36;Rb|Rubidium|37;Sr|Strontium|38;Y|Yttrium|39;Zr|Zirconium|40;Nb|Niobium|41;Mo|Molybdenum|42;Tc|Technetium|43;Ru|Ruthenium|44;Rh|Rhodium|45;Pd|Palladium|46;Ag|Silver|47;Cd|Cadmium|48;In|Indium|49;Sn|Tin|50;Sb|Antimony|51;Te|Tellurium|52;I|Iodine|53;Xe|Xenon|54;Cs|Caesium|55;Ba|Barium|56;W|Tungsten|74;Pt|Platinum|78;Au|Gold|79;Hg|Mercury|80;Pb|Lead|82;Bi|Bismuth|83;Rn|Radon|86;Ra|Radium|88;U|Uranium|92;Pu|Plutonium|94",
"Times tables|Problem|Answer|G||times",
"Roman numerals|Numeral|Number|RN||roman;1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;24;30;40;44;49;50;90;99;100;400;500;900;1000;1492;1776;1999;2000"}local j=#ae local O,Y,Z,af,au,ai,I={},{},{},{},{},{},{}for a,H in ipairs(ae)do local k={}for u in(H:match("^[^;]*").."|"):gmatch("([^|]*)|")do k[#k+1]=u end O[a],Y[a],Z[a],af[a],au[a],ai[a]=k[1],k[2],k[3],k[4],k[5],k[6]I[a]=k[4]:find("G")and 121 or select(2,H:gsub(";",""))end local aE="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"local ao={0,1,3,7,14,30}local X,ad,ah={},{["0"]=0},{["0"]=0}local W,_="[","["do local g=1 for c=1,6 do X[c]={}for L=0,ao[c]do local r=aE:sub(g+1,g+1)X[c][L],ad[r],ah[r]=r,c,L if c>=4 then _=_..r end g=g+1 end W=W..X[c][0]end W,_=W.."]",_.."]"end local aF={"Again","Hard","Good","Easy"}local aj={1000,"M",900,"CM",500,"D",400,"CD",100,"C",90,"XC",50,"L",40,"XL",10,"X",9,"IX",5,"V",4,"IV",1,"I"}local ap={5,10,15,20,30,50}local q,y,P={},{},{}local Q,C,V,N,ak,R,v,aa,F=0,0,0,0,0,0,10,0,1 local n,h,m,B,x="decks",1,1,1,false local e,w,D,ag=1,{},{},{}local i,t,ab,E={},1,false,3 local function M()local f=os.time()if not f or f<1700000000 then return nil end local a=os.date("*t",f)return os.time({year=a.year,month=a.month,day=a.day,hour=12})//86400 end local function T()local f={"K1",Q,C,V,N,ak,R,v,aa,F,table.concat(y,",")}for a=1,j do f[#f+1]=q[a]end snail.save(table.concat(f,";"))end local function aM()for a=1,j do q[a],y[a]=string.rep("0",I[a]),0 end local H=snail.load()if type(H)~="string"or H:sub(1,3)~="K1;"then return end local k={}for u in(H..";"):gmatch("([^;]*);")do k[#k+1]=u end local function z(b)return math.tointeger(tonumber(k[b]))or 0 end Q,C,V,N,ak,R=z(2),z(3),z(4),z(5),z(6),z(7)v,aa,F=z(8),z(9),z(10)if v<1 then v=10 end if F<1 or F>j then F=1 end local b=0 for u in(k[11]or""):gmatch("%d+")do b=b+1 if b<=j then y[b]=tonumber(u)end end for a=1,j do local l=(k[11+a]or""):gsub("[^%w]",""):sub(1,I[a])q[a]=l..string.rep("0",I[a]-#l)end end local function aO(d)if d<=0 then return end local aA={["0"]="0"}for r,c in pairs(ad)do if c>0 then aA[r]=X[c][math.max(0,ah[r]-d)]end end for a=1,j do q[a]=q[a]:gsub(".",aA)end end local function at(f)if f==Q then return end aO(f-Q)Q,C,P=f,0,{}for a=1,j do y[a]=0 end end local function am(a)local l=q[a]return select(2,l:gsub(W,"")),select(2,l:gsub("0","")),select(2,l:gsub(_,""))end local function aB(a,s)return math.max(0,math.min(s,v+(P[a]or 0)-y[a]))end local function as(a)return af[a]:find("R")~=nil end local function ay(a)return as(a)and(aa>>(a-1))&1==1 end local function aQ()local f=M()if f and R>=f-1 then return N end return 0 end local function aN(a)e,w,D,ag=a,{},{},{}if af[a]:find("G")then for o=2,12 do for c=2,12 do w[#w+1],D[#D+1]=o.." x "..c,tostring(o*c)end end elseif af[a]:find("N")then for al in ae[a]:gmatch(";(%d+)")do local u,ar=tonumber(al),""for d=1,#aj,2 do while u>=aj[d]do ar,u=ar..aj[d+1],u-aj[d]end end w[#w+1],D[#D+1]=ar,al end else for al in ae[a]:gmatch(";([^;]+)")do local o,c,g=al:match("^([^|]*)|([^|]*)|?(.*)$")local b=#w+1 w[b],D[b]=o,c if g~=""then ag[b]=g end end end end local function aw()local l=q[e]i,t={},1 for b=1,#l do local r=l:sub(b,b)if r~="0"and ah[r]==0 then i[#i+1]=b end end for b=#i,2,-1 do local K=math.random(b)i[b],i[K]=i[K],i[b]end local G=aB(e,I[e])for b=1,#l do if G<=0 then break end if l:sub(b,b)=="0"then i[#i+1],G=b,G-1 end end ab,E=false,3 end local function aR(a)local f=M()if f then at(f)end F=a aN(a)aw()n=t<=#i and"card"or"done"T()end local function aC(c,p)if p==1 then return 1 end if p==2 then return math.max(c,1)end if p==3 then return math.min(6,math.max(2,c+1))end return math.min(6,math.max(3,c+2))end local function aL(p)local b=i[t]local l=q[e]local c=ad[l:sub(b,b)]local S=aC(c,p)q[e]=l:sub(1,b-1)..X[S][ao[S]]..l:sub(b+1)if c==0 then y[e]=y[e]+1 end C,V=C+1,V+1 local f=M()if f and R~=f then N=R==f-1 and N+1 or 1 R=f if N>ak then ak=N end end if p==1 then table.insert(i,math.min(t+4,#i+1),b)elseif S==1 then i[#i+1]=b end t=t+1 ab,E=false,3 if t>#i then n="done"end T()end local function A(g,aT)return g.." "..aT..(g==1 and""or"s")end local function aU(c,p)local S=aC(c,p)if p==1 then return"see it again soon"end if S==1 then return"see it again at the end"end return"next in "..A(ao[S],M()and"day"or"session")end local function an()n,x="decks",false end function key(d)if n=="decks"then local g=j+2 if d=="up"then h=(h-2)%g+1 elseif d=="down"then h=h%g+1 elseif(d=="left"or d=="right")and h<=j and as(h)then aa=aa~(1<<(h-1))T()elseif d=="ok"then if h<=j then aR(h)elseif h==j+1 then n,m,B,x="options",1,F,false else n="help"end end return end if d=="top"then an();return end if n=="card"then if not ab then if d=="ok"then ab=true end elseif d=="up"or d=="left"then E=math.max(1,E-1)elseif d=="down"or d=="right"then E=math.min(4,E+1)elseif d=="ok"then aL(E)end elseif n=="done"then local av,s=am(e)if d=="ok"then if s>0 then P[e]=(P[e]or 0)+math.max(0,y[e]+5-v-(P[e]or 0))aw()if t<=#i then n="card"end else an()end end elseif n=="options"then if d=="up"then m,x=(m-2)%3+1,false elseif d=="down"then m,x=m%3+1,false elseif m==1 and(d=="left"or d=="right"or d=="ok")then local K=2 for aV,u in ipairs(ap)do if u==v then K=aV end end K=(K-1+(d=="left"and-1 or 1))%#ap+1 v=ap[K]T()elseif m==2 and(d=="left"or d=="right")then B,x=(B-1+(d=="left"and-1 or 1))%j+1,false elseif m==2 and d=="ok"then if x then q[B],y[B],P[B],x=string.rep("0",I[B]),0,nil,false T()else x=true end elseif m==3 and d=="ok"then an()end elseif d=="ok"then an()end end local function aP(b)if ay(e)then return D[b],w[b],Z[e],Y[e]end return w[b],D[b],Y[e],Z[e]end local function aH()snail.title("Flashcards")local H=aQ()if M()then snail.status("Streak "..A(H,"day")..", "..A(C,"review").." today")else snail.status(A(C,"review").." this session")end for a=1,j do local J,s=am(a)local G=aB(a,s)local ac if J>0 and G>0 then ac=J.." due, "..G.." new"elseif J>0 then ac=J.." due"elseif G>0 then ac=G.." new"else ac="done for today"end snail.row(O[a].." - "..ac,h==a)end snail.row("Options",h==j+1)snail.row("How it works",h==j+2)snail.rule()if h<=j then local av,s,aq=am(h)local g=I[h]local o,c=aq*24//g,(g-s)*24//g snail.image(ai[h])snail.board(string.rep("#",o)..string.rep("@",c-o)..string.rep("o",24-c))snail.small(g.." cards: "..aq.." learned, "..(g-s-aq).." learning, "..s.." new")if as(h)then local o,c=Y[h],Z[h]if ay(h)then o,c=c,o end snail.small("Shows "..o..", you recall "..c..".")snail.hint("BACK leave OK study L/R swap UP/DN move")else snail.small("Shows "..Y[h]..", you recall "..Z[h]..".")snail.hint("BACK leave OK study UP/DN move")end else snail.small(V==1 and"1 card reviewed in all."or(V.." cards reviewed in all."))snail.hint("BACK leave OK open UP/DN move")end end local function aG()snail.title(O[e])local b=i[t]local c=ad[q[e]:sub(b,b)]snail.status((c==0 and"New card"or"Review").." - "..(#i-t+1).." to go")local ax=(t-1)*24//#i snail.board(string.rep("#",ax)..string.rep("o",24-ax))local aD,o,av,az=aP(b)if not ab then snail.card({sprite=ai[e],name=aD,types=az..": ?",info="Think of the answer, then press OK."})snail.hint("BACK decks OK flip")return end snail.card({sprite=ai[e],name=aD,types=az..": "..o,info=ag[b]and(au[e].." "..ag[b])or""})snail.rule()for p=1,4 do snail.row(aF[p].." - "..aU(c,p),p==E)end snail.hint("BACK decks OK grade UP/DN choose")end local function aI()snail.title(O[e])snail.status("All done for now")local J,s=am(e)snail.text(A(C,"card").." reviewed today in all decks.")local U,g=nil,0 for r in q[e]:gmatch("[^0]")do local L=ah[r]if L>0 then if not U or L<U then U,g=L,1 elseif L==U then g=g+1 end end end local aS=M()and"day"or"session"if J>0 then snail.text(A(J,"card").." still due.")elseif U then snail.text("Next: "..A(g,"card").." in "..A(U,aS)..".")end if s>0 then snail.text(A(s,"new card").." left in this deck.")snail.gap()snail.row("Learn 5 more new cards",true)snail.hint("BACK decks OK learn more")else snail.text("You have seen every card in this deck.")snail.hint("BACK decks OK decks")end end local function aK()snail.title("Options")if x then snail.status("OK again erases "..O[B])end snail.row("New cards per day: "..v,m==1)snail.row("Reset progress: "..O[B],m==2)snail.row("Back to decks",m==3)snail.gap()snail.small("New cards per day is for each deck.")snail.small("Reset puts every card in a deck back to new.")if m==3 then snail.hint("BACK decks OK choose UP/DN move")elseif m==2 then snail.hint("BACK decks OK reset L/R deck UP/DN move")else snail.hint("BACK decks OK change L/R change UP/DN move")end end local function aJ()snail.title("How it works")snail.text("Pick a deck and press OK to study.")snail.text("Think of the answer, then press OK to flip the card.")snail.text("Grade yourself honestly: Again, Hard, Good or Easy.")snail.text("Cards you know come back less and less often: after 1, 3, 7, 14, then 30 days.")snail.text("A miss brings a card back in a moment, then from the start.")snail.text("Each deck adds up to "..v.." new cards a day; change it in Options.")snail.text("Due dates need the clock (connect to Wi-Fi once). Without it each session counts as a day.")snail.text("L/R on the deck list swaps which side you are shown.")snail.hint("BACK decks OK decks")end function draw()if n=="decks"then aH()elseif n=="card"then aG()elseif n=="done"then aI()elseif n=="options"then aK()else aJ()end end function start()math.randomseed(os.time())aM()local f=M()if f then at(f)elseif C>0 then at(Q+1)end h=F T()end
