xxxxxxxxxx
451
let originals = {};
let transliterations = {};
let translations = {};
let curOrig, curRoman, curTranslation;
let revealed;
let index;
let offset;
let hundredInts = {};
let metaIndex;
function preload() {}
function setup() {
rectMode(CENTER);
padding = width * .35;
setArrs();
createCanvas(windowWidth, windowHeight);
textSize(64);
textAlign(CENTER, CENTER);
revealed = false;
index = 0;
metaIndex = 0;
hundredInts = shuffle(hundredInts);
newWord();
offset = height / 6;
}
function draw() {
background(245);
textSize(width * .115);
fill(200)
text(metaIndex.toString(), width / 2, height / 6)
fill(0);
textSize(width * .16);
text(curOrig, width / 2, height / 4 + offset);
fill(120);
textSize(width * .125);
text(curRoman, width / 2, height / 2 + offset / 1.3);
fill(0);
if (curTranslation.length > 12) {
textSize(width * .08);
} else {
textSize(width * .125);
}
text(curTranslation, width / 2, height / 2, width - padding, height - padding);
if(metaIndex > 100)
{
curOrig = " ";
curRoman = " ";
curTranslation = "Finished!";
metaIndex = 100;
}
}
function reveal() {
curOrig = " ";
curRoman = " ";
revealed = true;
curTranslation = translations[index]
}
function newWord() {
//index = hundredInts[metaIndex]
index = metaIndex;
curTranslation = " ";
curOrig = originals[index];
curRoman = transliterations[index];
metaIndex++;
}
function onPress() {
if (!revealed) {
reveal();
} else {
newWord();
revealed = false;
}
}
function mouseClicked() {
onPress();
}
function keyPressed() {
if (key == " ") {
onPress();
}
if (keyCode == UP_ARROW) {
}
if (keyCode == DOWN_ARROW) {
}
}
function setArrs() {
hundredInts = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
80, 81, 82, 83, 84, 85, 86, 87, 88, 89,
90, 91, 92, 93, 94, 95, 96, 97, 98, 99
]
originals = ["τι",
"το",
"ο",
"η",
"τον",
"την",
"οι",
"τα",
"των",
"μου",
"σου",
"του",
"μας",
"σας",
"τους",
"εγώ",
"εσύ",
"εμείς",
"μένα",
"σένα",
"ένας",
"έναν",
"μία",
"ένα",
"πολύ",
"να",
"δε(ν)",
"μην",
"και (κι)",
"με",
"από",
"για",
"μα",
"ναι",
"όχι",
"στον",
"στο",
"στη",
"στους",
"στα",
"στις",
"στου",
"αυτός ο",
"αυτή η",
"αυτό το",
"αυτοί οι",
"αυτές οι",
"αυτά τα",
"αυτούς τους",
"έλα",
"χωρίς",
"είναι",
"ήταν",
"θα",
"ότι",
"πως",
"πώς",
"που",
"πού",
"πότε",
"γιατί",
"ποτέ",
"ξανά",
"έχω",
"όλος ο",
"όλη η",
"όλο το",
"όλοι οι",
"όλες οι",
"όλα τα",
"όλο τον",
"όλη την",
"όλους τους",
"όλες τις",
"ποιος",
"ποια",
"ποιο",
"πόσο",
"πόσα",
"πόση",
"πόσος",
"πόσοι",
"πόσες",
"πόσον",
"πόσους",
"καλά",
"κάτι",
"τίποτα",
"εντάξει",
"πρωί",
"μεσημέρι",
"απόγευμα",
"βράδυ",
"τότε",
"πιο",
"πια",
"σήμερα",
"χθες",
"αύριο",
"ώρα"
]
transliterations = [
"ti",
"to",
"o",
"ee",
"ton",
"tin",
"ee",
"ta",
"ton",
"mou",
"sou",
"tou",
"mas",
"sas",
"tous",
"ego",
"esee",
"emeis",
"mena",
"sena",
"enas",
"enan",
"mis",
"ena",
"polee",
"na",
"de",
"min",
"ke (ki)",
"me",
"apo",
"gia",
"ma",
"ne",
"ohi",
"ston",
"sto",
"sti",
"stous",
"sta",
"stis",
"stu",
"aftos o",
"aftee ee",
"afto to",
"aftee ee",
"aftes ee",
"afta ta",
"aftous tous",
"ela",
"horis",
"ine",
"itan",
"tha",
"oti",
"pos",
"pos",
"pou",
"pou",
"pote",
"yatee",
"pote",
"xana",
"eho",
"olos o",
"oleeee",
"olo to",
"olee ee",
"oles ee",
"ola ta",
"olo ton",
"olee tin",
"olous tous",
"oles tis",
"poios",
"poia",
"poio",
"poso",
"posa",
"posee",
"posos",
"posee",
"poses",
"poson",
"posous",
"kala",
"kati",
"tipota",
"entaxi",
"proi",
"mesimeri",
"apogevma",
"vradi",
"tote",
"pio",
"pia",
"simera",
"hthes",
"avrio",
"ora"
]
translations = [
"what",
"the (neuter, singular, nominative and accusative) / it (personal pronoun, neuter, singular, accusative)",
"the (masculine, singular)",
"the (feminine, singular)",
"the (masculine, singular, nominative)/ him (personal pronoun, masculine, singular, accusative)",
"the (feminine, singular, accusative) / her (personal pronoun, feminine, singular, accusative)",
"the (masculine and feminine, plural, nominative)",
"the (neuter, plural)",
"of the (possessive case, masculine, feminine and neuter, plural)",
"my / me(personal pronoun, singular, genitive)",
"your / you (singular)",
"of the (possessive case, masculine and neuter singular)/ his / him (personal pronoun masculine or neuter, genitive, singular)",
"our / us",
"your / you (plural)",
"their / them",
"I",
"you",
"we",
"me (personal pronoun, singular, accusative)",
"you (personal pronoun, singular, accusative)",
"a / one (masculine, singular, nominative)",
"a / one (masculine, singular, accusative)",
"a / one (feminine, singular, nominative and accusative)",
"a / one (neuter, singular, nominative and accusative)",
"very / much / a lot",
"to (particle)",
"not",
"do not",
"and",
"with / me (personal pronoun, singular, accusative)",
"from",
"for",
"but",
"yes",
"no",
"in, at, to (masculine, singular, accusative)",
"in, at, to (neuter, singular, accusative)",
"in, at, to (feminine, singular, accusative)",
"in, at, to (masculine, plural, accusative)",
"in, at, to (neuter, plural, accusative)",
"in, at, to (feminine, plural, accusative)",
"at (masculine and neuter, singular, genitive)",
"this (demonstrative pronoun, masculine, singular, nominative)",
"this (demonstrative pronoun, feminine, singular, nominative)",
"this (demonstrative pronoun, neuter, singular, nominative and accusative)",
"these (demonstrative pronoun, masculine, plural, nominative)",
"these (demonstrative pronoun, feminine, plural, nominative)",
"these (demonstrative pronoun, neuter, plural, nominative and accusative)",
"these (demonstrative pronoun, masculine, plural, accusative)",
"come",
"without",
"he, she, it is / they are",
"he, she, it was",
"will",
"that (conjunction)",
"that (conjunction)",
"how",
"who / which / that (relative pronoun)",
"where",
"when",
"why / because",
"never",
"again",
"I have",
"all (masculine, singular, nominative)",
"all (feminine, singular, nominative)",
"all (neuter, singular, nominative and accusative)",
"all (masculine, plural, nominative)",
"all(feminine, plural, nominative",
"all (neuter, plural, nominative and accusative)",
"all (masculine, singular accusative)",
"all (feminine, singular, accusative)",
"all (masculine, plural, accusative)",
"all (feminine, plural, accusative)",
"who / which (interrogative pronoun, masculine, singular, nominative)",
"who / which (interrogative pronoun, feminine, singular and neuter plural)",
"who / which (interrogative pronoun, neuter, singular, nominative, accusative)",
"how much (adverb or interrogative pronoun neuter, singular, nominative and accusative)",
"how much / many (interrogative pronoun, neuter, plural, nominative and accusative)",
"how much (interrogative pronoun feminine, singular, nominative and accusative)",
"how much (interrogative pronoun masculine, singular, nominative)",
"how much / many (interrogative pronoun masculine, plural, nominative)",
"how much (interrogative pronoun feminine, plural, nominative and accusative)",
"how much (interrogative pronoun masculine, singular, accusative)",
"how much /many(interrogative pronoun masculine, plural, accusative)",
"well",
"something",
"nothing",
"ok",
"morning",
"noon / afternoon (12:00-16:00)",
"afternoon",
"evening",
"then",
"more",
"anymore",
"today",
"yesterday",
"tomorrow",
"hour / time"
]
}